﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace Innova.Entites
{
    public partial class PATROCINADOR
    {
        public PATROCINADOR()
        {
            this.NEWs = new List<NEWS>();
            this.SERVICIOs = new List<SERVICIO>();
        }

        
        [Required]
        public int Id { get; set; }

       
        [Display(Name = "CategoriaId")]
        [Required(ErrorMessage = "La Categoría es requerida")]
        [Range(1, 100000, ErrorMessage = "Debe elegir una Categoría")]
        public int CategoriaId { get; set; }

        [Display(Name = "RUC")]
        [Required(ErrorMessage = "El número de RUC es requerido")]
        public string RUC { get; set; }

        [Display(Name = "RazonSocial")]
        [Required(ErrorMessage = "La Razón Social es requerida")]
        public string RazonSocial { get; set; }

        public byte[] Imagen { get; set; }

        public virtual CATEGORIA CATEGORIA { get; set; }

        public virtual ICollection<NEWS> NEWs{ get; set; }
        public virtual ICollection<SERVICIO> SERVICIOs { get; set; }

        public override string ToString()
        {
            return RazonSocial;
        }

    }
}
